import { request } from '../../request';

// get list by page
export function fetchGetTenantByPage(params: Api.Common.CommonSearchParams) {
  return request<Api.System.Tenant.TenantQueryRecord>({
    url: '/rbac/tenant/listByPage',
    method: 'post',
    data: params
  });
}

// delete by id
export function fetchDeleteTenantById(id: CommonType.IdType) {
  return request({
    url: '/rbac/tenant/deleteById',
    method: 'post',
    params: {
      id
    }
  });
}

// save model
export function fetchTenantSave(model: Api.System.Tenant.TenantFormModel) {
  return request({
    url: '/rbac/tenant/save',
    method: 'post',
    data: model
  });
}
